package Practice03;

public class TestStudent {
    public static void main(String[] args) {
        int ave=0;
        int max=0;
        int min=100;
        Student[] students = null;
        students = new Student[]{new Student(12, "lily", "女", 18, 82),
                new Student(114, "bob", "男", 19, 81),
                new Student(145, "ppgod", "男", 19, 79),
                new Student(3, "pony", "女", 19, 80),
                new Student(95, "susan", "男", 19, 99)};

        for (int i = 0; i < students.length; i++) {
            System.out.println(students[i].toString());
            ave += students[i].getsJava();
            if (students[i].getsJava() > max){
                max = students[i].getsJava();
            }
            if (students[i].getsJava() < min){
                min = students[i].getsJava();
            }

        }
        System.out.println("平均分是："+ave/ students.length);
        System.out.println("最高分是："+max);
        System.out.println("最低分是："+min);

    }
}
